// import Vue from 'vue'
// import App from './App.vue'

// Vue.config.productionTip = false

// new Vue({
//   render: h => h(App),
// }).$mount('#app')



import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

// 导入工具类
import logger from '@/utils/logger';
import request from '@/utils/request';

Vue.config.productionTip = false;
Vue.use(ElementUI);

// 全局挂载工具类
Vue.prototype.$logger = logger;
Vue.prototype.$http = request;

// 开发环境下在控制台可以访问logger
if (process.env.NODE_ENV === 'development') {
  window.$logger = logger;
  window.$http = request;
}

// new Vue({
//   render: h => h(App),
// }).$mount('#app')


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');

// 应用启动日志
logger.info('点餐系统前端应用启动', {
  mode: process.env.NODE_ENV,
  baseURL: process.env.VUE_APP_BASE_API,
  version: process.env.VUE_APP_VERSION || '1.0.0',
  userAgent: navigator.userAgent
});